/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package cl.zeke.pizzastore.vista.managedbeans;

import java.io.Serializable;
import javax.annotation.PostConstruct;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

/**
 *
 * @author taller
 */
@Component
@Scope("view")
public class TablaTestBean implements Serializable {
    
    private static Logger log = LoggerFactory.getLogger(TablaTestBean.class);
    
    private String[] filas;
    private String[] titulos;
    private Boolean[][] checks;

    @PostConstruct
    public void iniciar () {
        log.debug("INICIANDO!");
        filas = new String[] {"Fila 1", "Fila 2", "Fila 3", "Fila 4", "Fila 5", "Fila 6"};
        titulos = new String[] {"Titulo 1", "Titulo 2", "Titulo 3", "Titulo 4", "Titulo 5", "Titulo 6", "Titulo 7"};
        checks = new Boolean[filas.length][titulos.length];   
    }
    
    public String imprimir() {
        
        for(int i = 0; i < checks.length; i++) {
            for(int j=0; j < checks[i].length; j++) {
                log.debug(filas[i]+"-"+titulos[j]+": " + checks[i][j]);
            }
        }
        return null;
        
    }

    public String[] getFilas() {
        return filas;
    }

    public void setFilas(String[] filas) {
        this.filas = filas;
    }

    public String[] getTitulos() {
        return titulos;
    }

    public void setTitulos(String[] titulos) {
        this.titulos = titulos;
    }

    public Boolean[][] getChecks() {
        return checks;
    }

    public void setChecks(Boolean[][] checks) {
        this.checks = checks;
    }
    
    
    
    
    
}
